const mongoose = require("mongoose");
//动态
// 定义动态的Schema
const trendSchema = new mongoose.Schema({
  name: { type: String, required: true }, // 名字，添加required确保必填
  profileImage: { type: String, required: true }, // 头像，更名为profileImage以更明确其含义
  title: { type: String, required: true }, //内容标题
  content: { type: String, required: true }, // 内容，添加required确保必填
  createDate: { type: Date, default: Date.now }, // 发布日期，使用Date类型并设置默认值
  likes: { type: Number, default: 0 }, // 点赞数，初始化为0
  comments: { type: Number, default: 0 }, // 评论数，初始化为0
  shares: { type: Number, default: 0 }, // 分享数，初始化为0
  imageUrl: { type: String }, // 图片，重命名为imageUrl
  videoUrl: { type: String }, // 视频，重命名为videoUrl
  isPinned: { type: Boolean, default: false }, // 置顶，更改为isPinned以符合语义
  visibility: {
    type: String,
    enum: ["public", "friends", "private"],
    default: "public",
  }, // 可见范围
  tags: [{ type: String }], // 标签，确保tags是一个数组以容纳多个标签
  location: String, // 位置
});

const trendModel = new mongoose.model("trend", trendSchema, "trend");
// trendModel.create([
//   {
//     name: "徐秀兰",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "而空每里位参人存书米程主任办。团局中场问者九不至好众生代五。包见何知义中任为着复单论建。",
//     createDate: "1971-07-21 22:53:05",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "香港特别行政区",
//   },
//   {
//     name: "毛杰",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "变低火区快社位接万两装青最。济火东根光观条此者会见很。目真没能该员没车却保重农处劳。",
//     createDate: "1994-04-01 14:09:02",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "福建省",
//   },
//   {
//     name: "韩涛",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "然那快地们可每花县研完须地受。代省据要命点产适听方传各斯较。",
//     createDate: "2007-11-17 18:49:05",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "云南省",
//   },
//   {
//     name: "于超",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "给正空计天现好历世成院色只少积。声报毛多美正非文如音电而林半再。集片连很置打度将置想社容。",
//     createDate: "2006-10-06 07:22:47",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "广东省",
//   },
//   {
//     name: "姚敏",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "儿何青研产与难候自效文的但步资。",
//     createDate: "1977-01-22 03:03:39",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "吉林省",
//   },
//   {
//     name: "朱芳",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "直常连属确队手放才增象程样用根。",
//     createDate: "1997-12-02 13:57:15",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "新疆维吾尔自治区",
//   },
//   {
//     name: "汪刚",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "将至应还队生而保至元物斯情以例。完号比决速照性转时电后世集。",
//     createDate: "1972-06-27 23:39:39",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "重庆",
//   },
//   {
//     name: "林丽",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "热治文半地立消少者装到约本。军器万别图克加同阶候取资。会叫议在林八感市被造特拉七。",
//     createDate: "1995-04-13 22:30:51",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "西藏自治区",
//   },
//   {
//     name: "余强",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "机文决低外广形济克主五六象众具了。",
//     createDate: "1989-09-01 10:41:23",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "浙江省",
//   },
//   {
//     name: "余秀兰",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "严达响就龙称及历话全团象。变许前什技北置性料工毛等之华志书。极例住较里安间水江来建龙王达必。",
//     createDate: "1991-09-18 22:43:07",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "香港特别行政区",
//   },
//   {
//     name: "姚洋",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "复斗学定求影持组委响引才水马年山。也解料分了被色干按速际青太风。",
//     createDate: "1996-05-27 22:41:40",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "湖北省",
//   },
//   {
//     name: "陈涛",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "从统队着拉那道究即点条空本温心建以。然接几数率片与思本知带集节行受约。复金水机图数元统边县者党飞应史那共。",
//     createDate: "1996-03-22 08:00:23",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "河南省",
//   },
//   {
//     name: "尹丽",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content:
//       "下记铁下成给火儿中口石必准。水却周应组今九区压程增想特通。养义火文党已收发经性大张满道等一。",
//     createDate: "1993-09-15 21:22:49",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "河北省",
//   },
//   {
//     name: "武娟",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "价展候组月连因治水建理越制门两按。等位队来相周马长定部果不战。",
//     createDate: "1978-02-26 12:42:04",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "香港特别行政区",
//   },
//   {
//     name: "赵明",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "着际心次线效造安门山公研院规市业细。",
//     createDate: "1984-08-08 20:22:35",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "江苏省",
//   },
//   {
//     name: "赖娟",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "段住来式水清代边山办统要。布量公据是劳战车族温物复。",
//     createDate: "1988-02-29 04:27:10",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "新疆维吾尔自治区",
//   },
//   {
//     name: "沈霞",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "起工查物务之即布在通能造。",
//     createDate: "2019-08-22 22:13:38",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "湖南省",
//   },
//   {
//     name: "杜超",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "健康的一天",
//     content: "专安种龙置约运本议知部即米通。此何严林走属没消证因还该专办情。",
//     createDate: "2003-08-30 01:26:34",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "新疆维吾尔自治区",
//   },
//   {
//     name: "曹桂英",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "每天跑跑",
//     content: "则品党情至志下队给们传温力。还层劳今她回厂华活设体今层。",
//     createDate: "2002-03-12 12:50:16",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "台湾",
//   },
//   {
//     name: "邵超",
//     profileImage: "http://dummyimage.com/200x100/4A7BF7&text=Hello",
//     title: "感觉超级累",
//     content:
//       "至是下从展质气料造火样向社场。维铁备县须铁么院将几整也思青和。路油教金设而取低门拉机思知照论群。",
//     createDate: "1989-11-23 05:16:50",
//     likes: 0,
//     comments: 0,
//     shares: 0,
//     imageUrl: "../upload/2.jpg",
//     videoUrl: "../upload/2.jpg",
//     isPinned: false,
//     visibility: "public",
//     tags: ["晨跑", "每日打卡"],
//     location: "陕西省",
//   },
// ]);

module.exports = {
  trendModel,
};
